﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategoryHelpManager.ascx.cs"
    Inherits="controls_admin_ViewCategory" %>
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Quản lý danh mục trợ giúp
        </h5>
        <div class="search">
            <div class="input">
            </div>
            <div class="button">
            </div>
        </div>
    </div>
    <!-- end box / title -->
    <div id="message" runat="server" />
    <div class="form" style="height: 300px; padding-bottom: 40px;">
        <div style="position: absolute; left: 80px; width: 250px; height: auto;">
            <asp:ListBox ID="lbCategory" runat="server" Height="300px" Width="100%" AutoPostBack="True"
                AppendDataBoundItems="true" OnSelectedIndexChanged="lbCategory_SelectedIndexChanged"
                CssClass="listbox" BackColor="Transparent"></asp:ListBox>
        </div>
        <div style="position: absolute; left: 330px; width: 20px; height: 500px;">
            <asp:Button ID="btnDel" runat="server" CssClass="icon-32-delete" BackColor="Transparent"
                BorderStyle="None" ToolTip="Xóa" OnClick="btnDel_Click" UseSubmitBehavior="false" /><br />
            <%--<asp:Button ID="btnUp" runat="server" CssClass="icon-32-up" BackColor="Transparent"
                BorderStyle="None" ToolTip="Chuyển lên" OnClick="btnUp_Click" UseSubmitBehavior="false" /><br />
            <asp:Button ID="btnDown" runat="server" CssClass="icon-32-down" BackColor="Transparent"
                BorderStyle="None" ToolTip="Chuyển xuống" OnClick="btnDown_Click" UseSubmitBehavior="false" />--%>
        </div>
        <div class="fields" style="left: 280px; margin: 0; padding: 0 0 8px 0; width: auto;
            position: relative;">
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Tên danh mục:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <div style="float: left">
                        <asp:TextBox ID="txtCategoryName" runat="server" Width="180px" CssClass="cateName" />
                    </div>
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Icon:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <div style="float: left">
                        <img id="imgIcon" runat="server" /><br />
                        <asp:FileUpload ID="fuIcon" runat="server" />
                    </div>
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Mô tả:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <div style="float: left; margin-right: 10px">
                        <asp:TextBox ID="txtDescription" runat="server" Width="180px" CssClass="description" />
                    </div>
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Thứ tự hiển thị:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <div style="float: left; margin-right: 10px">
                        <asp:TextBox ID="txtSortDisplay" runat="server" Width="180px" CssClass="required number"
                            Text="1" />
                    </div>
                </div>
            </div>
            <div class="buttons">
                <asp:Button ID="btnAdd" runat="server" Text="Thêm mới" Width="100px" OnClick="btnAdd_Click" />
                <asp:Button ID="btnUpdate" runat="server" Text="Cập nhật" Width="100px" OnClick="btnUpdate_Click" />
                <asp:HiddenField ID="hfParent" runat="server" />
                <asp:HiddenField ID="hfDate" runat="server" />
                <asp:HiddenField ID="hfBy" runat="server" />
                <asp:HiddenField ID="hfIcon" runat="server" />
            </div>
        </div>
    </div>
    <div style="text-align: center; margin: 10px">
        <%if (Session["url"] != null)
          {
              if (Request.UrlReferrer != null)
              {
                  if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                  {
                      Session["url"] = Request.UrlReferrer.ToString();                      
                  
        %>
        <a onclick="history.go(-1);" title="Trang trước">
            <%
}
                      else
                      {
            %>
            <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                <%   
}
                  }
                  else
                  {                      
                %>
                <a onclick="history.go(-1);" title="Trang trước">
                    <%}
              }
          else
          {
              if (Request.UrlReferrer != null)
                  Session.Add("url", Request.UrlReferrer.ToString());
              else
                  Session.Add("url", Request.Url.ToString());
                    %>
                    <a href="default.aspx" title="Trang trước">
                        <%} %>
                        <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                    &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                        <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
    </div>
</div>
